package com.tinyideatech.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tinyideatech.system.entity.SysDict;
import com.tinyideatech.system.mapper.SysDictMapper;
import com.tinyideatech.system.service.ISysDictService;
import org.springframework.stereotype.Service;

/**
 * @author zhangy-5
 * @date 2019-08-10
 */
@Service
public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> implements ISysDictService {

    @Override
    public void changeStatus(SysDict dict) {
        SysDict sysDict = getById(dict.getDictId());
        if(sysDict != null){
            sysDict.setStatus(dict.getStatus());
            updateById(sysDict);
        }
    }
}
